package com.fanghuaiming.seata.order.spi.account;

import com.fanghuaiming.seata.order.spi.account.fallback.SeataAccountFeignClientFallBack;
import java.math.BigDecimal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/****
 * @description: 账户微服务SPI
 * @version:1.0.0
 * @author fanghuaiming
 * @data Created in 2020/11/27 下午5:19
 *
 */
@FeignClient(name = "xa-seata-tcc-cloud-account",fallback = SeataAccountFeignClientFallBack.class)
public interface SeataAccountFeignClient {

    /**
     * @Description: 扣减账户
     *
     * @param:
     * @return:
     * @auther: fanghuaiming
     * @date: 2020/11/27 下午5:20
     * @version:1.0.0
     */
    @GetMapping("/account/decreaseAccount")
    String decreaseAccount(@RequestParam("userId") Long userId,@RequestParam("money") BigDecimal money);
}
